package starcoast.bocai.com.starcoast.fragments;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import butterknife.Bind;
import butterknife.ButterKnife;
import starcoast.bocai.com.starcoast.R;
import starcoast.bocai.com.starcoast.activitys.SearchActivity;
import starcoast.bocai.com.starcoast.activitys.life.SearchBusinessActivity;
import starcoast.bocai.com.starcoast.common.BaseFragment;

/**
 * Created by admin on 2016/6/3.
 */
public class LifeFragment extends BaseFragment implements View.OnClickListener{
    @Bind(R.id.tv_title)
    TextView mTitleTv;
    @Bind(R.id.toolbar)
    Toolbar toolbar;
    @Bind(R.id.message)
    ImageView message;
    View view;
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        view = inflater.inflate(R.layout.fragment_life, container, false);
        ButterKnife.bind(this, view);
        initView();
        return view;
    }
    public void initView(){
        mTitleTv.setText(R.string.str_frag_life);
        toolbar.inflateMenu(R.menu.menu_search);
        message.setVisibility(View.VISIBLE);
        message.setOnClickListener(this);
        toolbar.setOnMenuItemClickListener(new Toolbar.OnMenuItemClickListener() {
            @Override
            public boolean onMenuItemClick(MenuItem item) {
                startActivity(new Intent(getActivity(), SearchBusinessActivity.class));
                return false;
            }
        });
    }

    @Override
    public void onClick(View v) {

    }
}
